﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Library_Code.DAL;

namespace Library_Code.BIZ
{
  public  class SANPHAM
    {
      SanPhamDAL dal = new SanPhamDAL();
      [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int IdSanPham { get; set; }
        public int MaSP { get; set; }
        public string TenSP { get; set; }
        public string MauSac { get; set; }
        public string ChatLieu { get; set; }
        public Nullable<decimal> DonGia { get; set; }
        public string MoTa { get; set; }
        public Nullable<int> IdThuongHieu { get; set; }
        public Nullable<int> IdLoaiSP { get; set; }
        

        public virtual LOAISP LOAISP { get; set; }
        public virtual THUONGHIEU THUONGHIEU { get; set; }
       // public virtual CTHD CTHDs { get; set; }
       // public virtual CTPN CTPNs { get; set; }
        public virtual List<TONKHO> TONKHOes { get; set; }
       // public virtual List<HINHANH> HINHANHs { get; set; }
       
      public string GetTenSanPham(int masp)
      {
          return dal.GetTenSP(masp);
      }
      public int GetIdSanPham(int masp)
      {
          return dal.GetIdSanPham(masp);
      }
    }
}
